package grpc_demo

import (
	"protobuf/handler"
	"protobuf/pb"

	"go-micro.dev/v4"
)

func RegConsul() {
	// TODO micro
	// create a new service
	service := micro.NewService(
		micro.Name("future"),
		micro.Version("latest"),
	)

	// initialise flags
	service.Init()

	// register handler
	pb.RegisterFutureHandler(service.Server(), &handler.Future{})

	// start the service
	service.Run()
}
